//
//  HYTableViewSection.h
//
//  Created by yan on 2017/5/8.
//  Copyright © 2017年 yan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "HYTableViewRow.h"


@interface HYTableViewSection : NSObject

@property (nonatomic, strong) NSMutableArray *sections;

- (void)addRowModel:(HYTableViewRow *)model atSection:(NSUInteger)section; // section default 0
- (void)addRowModels:(NSArray<HYTableViewRow *> *)models atSection:(NSUInteger)section; // section default 0
- (void)insertSectionWithModels:(NSArray<HYTableViewRow *> *)models atIndex:(NSUInteger)index; // insert a section after index
- (void)insertRowModel:(HYTableViewRow *)model atIndexPath:(NSIndexPath *)indexPath;

- (void)removeRow:(NSUInteger)row AtSection:(NSUInteger)section;
- (void)removeSection:(NSUInteger)section;

- (id)modelAtIndexPath:(NSIndexPath *)indexPath;
- (NSUInteger)numberOfSections;
- (NSUInteger)numberOfRowsInSection:(NSUInteger)section;

@end
